<?php



/**
 * Skeleton subclass for representing a row from the 'view_bgf_with_superior_position_id' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.empeval
 */
class EmpevalViewBgfWithSuperiorPositionId extends EmpevalBaseViewBgfWithSuperiorPositionId
{
	
	public function isEmployee(EmpevalUsers $user) {
		return ($this->getUserPositionsRelatedByUserPositionId()->getUserId() == $user->getId());
	}
	
	public function isSuperior(EmpevalUsers $user) {
		if (!($this->getUserPositionsRelatedBySuperiorUserPositionId() instanceof EmpevalUserPositions))
			return false;
		return ($this->getUserPositionsRelatedBySuperiorUserPositionId()->getUserId() == $user->getId());
	}
	
}
